package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.RentBillaccountMapper;
import com.rzl.expense.expense.domain.RentBillaccount;
import com.rzl.expense.expense.service.IRentBillaccountService;

/**
 * 房租报账点信息Service业务层处理
 * 
 * @author expense
 * @date 2024-11-27
 */
@Service
public class RentBillaccountServiceImpl implements IRentBillaccountService 
{
    @Autowired
    private RentBillaccountMapper rentBillaccountMapper;

    /**
     * 查询房租报账点信息
     * 
     * @param billaccountId 房租报账点信息主键
     * @return 房租报账点信息
     */
    @Override
    public RentBillaccount selectRentBillaccountByBillaccountId(String billaccountId)
    {
        return rentBillaccountMapper.selectRentBillaccountByBillaccountId(billaccountId);
    }

    /**
     * 查询房租报账点信息列表
     * 
     * @param rentBillaccount 房租报账点信息
     * @return 房租报账点信息
     */
    @Override
    public List<RentBillaccount> selectRentBillaccountList(RentBillaccount rentBillaccount)
    {
        return rentBillaccountMapper.selectRentBillaccountList(rentBillaccount);
    }

    /**
     * 新增房租报账点信息
     * 
     * @param rentBillaccount 房租报账点信息
     * @return 结果
     */
    @Override
    public int insertRentBillaccount(RentBillaccount rentBillaccount)
    {
        rentBillaccount.setCreateTime(DateUtils.getNowDate());
        return rentBillaccountMapper.insertRentBillaccount(rentBillaccount);
    }

    /**
     * 修改房租报账点信息
     * 
     * @param rentBillaccount 房租报账点信息
     * @return 结果
     */
    @Override
    public int updateRentBillaccount(RentBillaccount rentBillaccount)
    {
        rentBillaccount.setUpdateTime(DateUtils.getNowDate());
        return rentBillaccountMapper.updateRentBillaccount(rentBillaccount);
    }

    /**
     * 批量删除房租报账点信息
     * 
     * @param billaccountIds 需要删除的房租报账点信息主键
     * @return 结果
     */
    @Override
    public int deleteRentBillaccountByBillaccountIds(String[] billaccountIds)
    {
        return rentBillaccountMapper.deleteRentBillaccountByBillaccountIds(billaccountIds);
    }

    /**
     * 删除房租报账点信息信息
     * 
     * @param billaccountId 房租报账点信息主键
     * @return 结果
     */
    @Override
    public int deleteRentBillaccount()
    {
        return rentBillaccountMapper.deleteRentBillaccount();
    }




    @Override
    public void batchRentBillaccount(List<RentBillaccount> list)
    {

         rentBillaccountMapper.batchRentBillaccount(list);
    }


}
